package com.byzk.p2p.admin.system.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.byzk.p2p.admin.system.dao.CallbackDao;
import com.byzk.p2p.admin.system.dto.Callback;

@Service
public class CallbackService {

	@Autowired
	private CallbackDao callbackDao;
	
	public Integer saveOrUpdate(Callback callback){
		if(callback.getId()==null){
			return callbackDao.insert(callback);
		}else{
			return callbackDao.update(callback);
		}
	}
	

	
	public Integer batchInsert(List<Callback> listCallback){
		return callbackDao.batchInsert(listCallback);
	}
	
	
}
